// ----------------------------------------------------------------------------
// diabindException.h
// Exception object
// ----------------------------------------------------------------------------

#pragma once

// ----------------------------------------------------------------------------

namespace diabind
{

// ----------------------------------------------------------------------------

class CException : public std::exception
{
    typedef std::exception CBase;
public:
    explicit CException(HRESULT hResult, const char *szFunctionName);

    HRESULT GetResult() const;

    std::string GetDescription() const;

private:
    HRESULT m_hResult;
};

// ----------------------------------------------------------------------------

class CPyException : public std::exception
{
    typedef std::exception CBase;
public:
    explicit CPyException(PyObject *pType, const char *szDesc);

    static void Translate(CPyException const& Exception);

private:
    PyObject *m_pType;
};


// ----------------------------------------------------------------------------

}   // namespace diabind

// ----------------------------------------------------------------------------
